package cn.stylefeng.guns.modular.business.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 卡号
 * </p>
 *
 * @author jwj
 * @since 2019-07-12
 */
@TableName("c_card")
@Data
public class Card implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "card_id", type = IdType.AUTO)
    private Integer cardId;

    /**
     * 卡号
     */
    @TableField("card_no")
    private String cardNo;

    /**
     * 卡密
     */
    @TableField("card_password")
    private String cardPassword;

    /**
     * 卡号状态，0已入库，待销售，1已销售
     */
    @TableField("card_status")
    private Integer cardStatus;

    /**
     * 提交申请卡号的用户名
     */
    @TableField("create_user")
    private String createUser;

    /**
     * 提交申请卡号的用户id
     */
    @TableField("create_user_id")
    private Long createUserId;

    /**
     * 面值
     */
    @TableField("quota")
    private Integer quota;


    /**
     * 面值
     */
    @TableField("quota_name")
    private String quotaName;
    /**
     * 面值id
     */
    @TableField("quota_id")
    private Integer quotaId;

    /**
     * 回收价格
     */
    @TableField("amount")
    private BigDecimal amount;

    /**
     * 回收费率
     */
    @TableField("recover_rate")
    private Float recoverRate;

    /**
     * 成本费率
     */
    @TableField("cost_rate")
    private Float costRate;

    /**
     * 成本价格
     */
    @TableField("cost_amount")
    private BigDecimal costAmount;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField("delete_flag")
    private Integer deleteFlag;

    /**
     * 订单Id
     */
    @TableField("order_id")
    private Integer orderId;

    /**
     * 订单编号
     */
    @TableField("order_no")
    private String orderNo;

    /**
     * 分类
     */
    @TableField("card_cataory_name")
    private String cardCataoryName;

    /**
     * 分类Id
     */
    @TableField("card_cataory_id")
    private Long cardCataoryId;

    @Override
    public String toString() {
        return "Card{" +
        "cardId=" + cardId +
        ", cardNo=" + cardNo +
        ", cardPassword=" + cardPassword +
        ", cardStatus=" + cardStatus +
        ", createUser=" + createUser +
        ", createUserId=" + createUserId +
        ", quota=" + quota +
        ", amount=" + amount +
        ", recoverRate=" + recoverRate +
        ", costRate=" + costRate +
        ", costAmount=" + costAmount +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", delFlag=" + deleteFlag +
        ", orderId=" + orderId +
        ", cardCataoryId=" + cardCataoryId +
        "}";
    }
}
